USE [HR_DB]
GO
if exists(select * from dbo.sysobjects where id = object_id(N'major_change')   and   OBJECTPROPERTY(id,   N'IsUserTable')   =   1)   
  drop table major_change  
-- =============================================
-- Author:杨洁(kaixuanpisces)
-- Create date: 20090826
-- Description:职位调动表
-- =============================================
CREATE TABLE [dbo].[major_change](
	[mch_id] [smallint] IDENTITY(1,1) NOT NULL,
	[first_kind_id] [char](2) NULL,
	[first_kind_name] [varchar](60) NULL,
	[second_kind_id] [char](2) NULL,
	[second_kind_name] [varchar](60) NULL,
	[third_kind_id] [char](2) NULL,
	[third_kind_name] [varchar](60) NULL,
	[major_kind_id] [char](2) NULL,
	[major_kind_name] [varchar](60) NULL,
	[major_id] [char](2) NULL,
	[major_name] [varchar](60) NULL,
	[new_first_kind_id] [char](2) NULL,
	[new_first_kind_name] [varchar](60) NULL,
	[new_second_kind_id] [char](2) NULL,
	[new_second_kind_name] [varchar](60) NULL,
	[new_third_kind_id] [char](2) NULL,
	[new_third_kind_name] [varchar](60) NULL,
	[new_major_kind_id] [char](2) NULL,
	[new_major_kind_name] [varchar](60) NULL,
	[new_major_id] [char](2) NULL,
	[new_major_name] [varchar](60) NULL,
	[human_id] [varchar](30) NULL,
	[human_name] [varchar](60) NULL,
	[salary_standard_id] [varchar](30) NULL,
	[salary_standard_name] [varchar](60) NULL,
	[salary_sum] [money] NULL,
	[new_salary_standard_id] [varchar](30) NULL,
	[new_salary_standard_name] [varchar](60) NULL,
	[new_salary_sum] [money] NULL,
	[change_reason] [text] NULL,
	[check_reason] [text] NULL,
	[check_status] [smallint] NULL,
	[register] [int] NULL,
	[checker] [int] NULL,
	[regist_time] [datetime] NULL,
	[check_time] [datetime] NULL,
 CONSTRAINT [major_change_PK] PRIMARY KEY CLUSTERED 
(
	[mch_id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-- ==============================================
-- 列名说明
-- ==============================================
GO
SET ANSI_PADDING OFF
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键，自动增长列' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'major_change', @level2type=N'COLUMN',@level2name=N'mch_id'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'一级机构编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'major_change', @level2type=N'COLUMN',@level2name=N'first_kind_id'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'一级机构名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'major_change', @level2type=N'COLUMN',@level2name=N'first_kind_name'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'二级机构编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'major_change', @level2type=N'COLUMN',@level2name=N'second_kind_id'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'二级机构名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'major_change', @level2type=N'COLUMN',@level2name=N'second_kind_name'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'三级机构编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'major_change', @level2type=N'COLUMN',@level2name=N'third_kind_id'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'三级机构名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'major_change', @level2type=N'COLUMN',@level2name=N'third_kind_name'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'职位分类编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'major_change', @level2type=N'COLUMN',@level2name=N'major_kind_id'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'职位分类名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'major_change', @level2type=N'COLUMN',@level2name=N'major_kind_name'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'职位编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'major_change', @level2type=N'COLUMN',@level2name=N'major_id'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'职位名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'major_change', @level2type=N'COLUMN',@level2name=N'major_name'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'新一级机构编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'major_change', @level2type=N'COLUMN',@level2name=N'new_first_kind_id'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'新一级机构名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'major_change', @level2type=N'COLUMN',@level2name=N'new_first_kind_name'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'新二级机构编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'major_change', @level2type=N'COLUMN',@level2name=N'new_second_kind_id'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'新二级机构名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'major_change', @level2type=N'COLUMN',@level2name=N'new_second_kind_name'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'新三级机构编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'major_change', @level2type=N'COLUMN',@level2name=N'new_third_kind_id'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'新三级机构名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'major_change', @level2type=N'COLUMN',@level2name=N'new_third_kind_name'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'新职位分类编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'major_change', @level2type=N'COLUMN',@level2name=N'new_major_kind_id'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'新职位分类名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'major_change', @level2type=N'COLUMN',@level2name=N'new_major_kind_name'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'新职位编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'major_change', @level2type=N'COLUMN',@level2name=N'new_major_id'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'新职位名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'major_change', @level2type=N'COLUMN',@level2name=N'new_major_name'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'人力资源档案编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'major_change', @level2type=N'COLUMN',@level2name=N'human_id'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'姓名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'major_change', @level2type=N'COLUMN',@level2name=N'human_name'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'薪酬标准编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'major_change', @level2type=N'COLUMN',@level2name=N'salary_standard_id'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'薪酬标准名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'major_change', @level2type=N'COLUMN',@level2name=N'salary_standard_name'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'薪酬总额' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'major_change', @level2type=N'COLUMN',@level2name=N'salary_sum'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'新薪酬标准编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'major_change', @level2type=N'COLUMN',@level2name=N'new_salary_standard_id'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'新薪酬标准名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'major_change', @level2type=N'COLUMN',@level2name=N'new_salary_standard_name'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'新薪酬总额' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'major_change', @level2type=N'COLUMN',@level2name=N'new_salary_sum'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'调动原因' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'major_change', @level2type=N'COLUMN',@level2name=N'change_reason'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'审核通过意见' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'major_change', @level2type=N'COLUMN',@level2name=N'check_reason'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'复核通过状态' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'major_change', @level2type=N'COLUMN',@level2name=N'check_status'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'登记人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'major_change', @level2type=N'COLUMN',@level2name=N'register'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'复核人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'major_change', @level2type=N'COLUMN',@level2name=N'checker'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'登记时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'major_change', @level2type=N'COLUMN',@level2name=N'regist_time'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'复核时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'major_change', @level2type=N'COLUMN',@level2name=N'check_time'